package sg.edu.nus.iss.jass.datastore;

import java.util.Collection;
import java.util.List;

/**
 * <p>Filter objects from given collection by some criteria</p>
 * 
 * @author Wang DaYong
 * 
 */
public interface ISelector {

	/**
	 * <p>Filter objects from given collection by some criteria.<p>
	 * 
	 * @param <T> Any kind of <code>Object</code>
	 * @param list
	 *            The destination collection of objects is to be filtered
	 * @return filtered list
	 * @throws Exception
	 *            	If encounter any error when performing filtering.
	 */
	public <T extends Object> List<T> filter(Collection<T> list) throws Exception;
}
